﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using Ay.Framework.WPF.Controls;
using Ay.MvcFramework;
using MPSystem.Controllers;
using System.ComponentModel;
using Ay.Framework.WPF;
using Base.BLL;
using Base.Util;
using Application = System.Windows.Application;
using MPSystem.Views.Others;

namespace MPSystem.Views
{
    /// <summary>
    /// _ViewStartView.xaml 
    /// 创建时间：2017/9/5 11:57:44
    /// </summary>
    public partial class _ViewStart : AyWindow
    {
        public _ViewStart()
        {
            InitializeComponent();

        }


        private void closeing(object sender, CancelEventArgs e)
        {
            AyMessageBox.ShowInformation("感谢使用，系统即将关闭！");

            try
            {
                if (ComService.cs.IsStart)
                    ComService.cs.Stop();
                if (FTPPage.SendTimer != null)
                    FTPPage.SendTimer.Stop();
                System.Windows.Application.Current.Shutdown();
                base.OnClosed(e);

            }
            catch (Exception ex)
            {
                LoggerHelper.Error(ex);
            }

        }
    }


























    public partial class _ViewStart : AyWindow
    {
        #region 控制器
        private Actions<ViewStartController> _mvc;
        public Actions<ViewStartController> Mvc
        {
            get
            {
                if (_mvc == null)
                {
                    _mvc = new Actions<ViewStartController>(DataContext as ViewStartController);
                }
                return _mvc;
            }
        }
        #endregion
    }
}
